package com.ruoyi.platform.system.exception.pojo;

import com.ruoyi.base.enums.ExceptionEnum;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 错误码code
 *
 * @author lcf
 */
@ApiModel
@NoArgsConstructor
@Data
public class ExceptionCodeDTO {
    /**
     * code
     */
    private Integer code;
    /**
     * msg
     */
    private String msg;

    public ExceptionCodeDTO(ExceptionEnum exception) {
        this.code = exception.getCode();
        this.msg = exception.getMsg();
    }
}
